<%@page import="com.mmy.domain.sys.TSysUser"%>
<!-- 引入地点 -->
<%@page import="com.mmy.domain.constzone.TConstZone"%>
<!-- 引入景点 -->
<%@page import="com.mmy.domain.train.TTrainBase"%>


<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/include1.jsp"></jsp:include>
<script type="text/javascript" src="js/jsp/front/trainbase/trainPlanIndex.js"></script>
<title>美美游火车票 </title>
<style type="text/css">
.tabPlane-box div{display:none;}

</style>
<script>

$().ready(function(){
 var index = $('input[name=strIsReturn][checked]').val();
//让内容框的第 _index 个显示出来，其他的被隐藏
    $(".tabPlane-box>div").eq(index).show().siblings().hide();
  $(".radio1").click(function(){
    var _index = $(this).val();
  //让内容框的第 _index 个显示出来，其他的被隐藏
    $(".tabPlane-box>div").eq(_index).show().siblings().hide();
  });
});
</script>

		<script>
$(function () {
laydate.render({
  elem: '#TrainOutDate',
  type: 'date' ,
  theme: '#1eab3c',
  value: ''
	});


laydate.render({
  elem: '#TrainOutDate1',
  type: 'date' ,
  theme: '#1eab3c',
  value: ''
	});
laydate.render({
  elem: '#TrainBackDate1',
  type: 'date' ,
  theme: '#1eab3c',
  value: ''
	});
});
</script>
</head>
<body>
	<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/FrontHeader.jsp" flush="true"></jsp:include>
<div id="index-back">
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main Start -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<main class="at-padding-large-bottom"> 
		<article> 
		<!--丢弃原来样式 参照前台招标搜索样式 2020.12.30 hanxl 原来class="bg-light ...." -->
			<header class="frontbg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
					<div class="page-header container">
					<div class="row">
						<div class="span-3 col">
							<h2 class="h2color" >火车票</h2>
								
						</div>	
						<div class="span-9 col" id="websitesearchdiv" >
						
							
							<div class="at-float-left tabPlane" style="width:100%;">
							<div class="tabPlane-menu" >
							<h4 class="widget-title at-float-left">
							<span><label for="isReturn" class="seachfont"> 是否往返：:</label></span>
							<input type="radio" class="radio1" id="isReturn"  name="strIsReturn"  value="0" <c:if test="${strIsReturn==0}"> checked="checked"</c:if> /><label for="isReturn" style="font-size:18px;">单程</label>
						<input type="radio" class="radio1" id="isReturn1" name="strIsReturn"  value="1" <c:if test="${strIsReturn==1}"> checked="checked"</c:if>/><label for="isReturn1" style="font-size:18px;">往返</label>
						<!-- <input type="radio" class="radio1" id="isReturn2" name="strIsReturn"  value="2" <c:if test="${strIsReturn==2}"> checked="checked"</c:if>/><label for="isReturn2" style="font-size:18px;">多程</label>
						
					 -->	</h4>
						</div>
						</div>
						<div class="tabPlane-box" style="width:100%;">
						<!-- 单程 -->
						<div>
				 <div id="allmap">
							</div>
						<!-- 12.30 将form表单样式去丢  原有class="info-form" -->
						<form action="frontsearchtrainplan?strIsReturn=0"  method="post" >
						<h4 class="widget-title at-float-left">
			<span><label for="homecity_name1" class="seachfont">出发地：</label></span>	
		<input type="text" value="${strOutCityName }" size="15" id="homecity_name1"  class="input-width" name="homecity_name" mod="address|notice" mod_address_source="hotel" mod_address_suggest="@Beijing|北京|53@Shanghai|上海|321@Shenzhen|深圳|91@Guangzhou|广州|80@Qingdao|青岛|292@Chengdu|成都|324@Hangzhou|杭州|383@Wuhan|武汉|192@Tianjin|天津|343@Dalian|大连|248@Xiamen|厦门|61@Chongqing|重庆|394@" mod_address_reference="cityid" mod_notice_tip="中文/拼音" style="font-size:16px;" />
		<input id="cityid1" name="cityid" type="hidden" value="${strcityid }"/>
		<a onclick="exchange()"><i class="fa fa-exchange " aria-hidden="true" style="color: #1eab3c"  ></i></a>
		<span><label for="getcity_name1" class="seachfont">目的地：</label></span>	
		
		<input type="text" value="${strInCityName }" size="15" id="getcity_name1"  class="input-width" name="getcity_name" mod="address|notice" mod_address_source="hotel" mod_address_suggest="@Beijing|北京|53@Shanghai|上海|321@Shenzhen|深圳|91@Guangzhou|广州|80@Qingdao|青岛|292@Chengdu|成都|324@Hangzhou|杭州|383@Wuhan|武汉|192@Tianjin|天津|343@Dalian|大连|248@Xiamen|厦门|61@Chongqing|重庆|394@" mod_address_reference="getcityid" mod_notice_tip="中文/拼音" style="font-size:16px;" />
		<input id="getcityid1" name="getcityid" type="hidden"  value="${strgetcityid }"/>
		
		<div id="jsContainer" class="jsContainer" style="height:0">
		    <div id="tuna_alert" style="display:none;position:absolute;z-index:999;overflow:hidden;"></div>
		    <div id="tuna_jmpinfo" style="visibility:hidden;position:absolute;z-index:120;"></div>
		</div>
		<!-- 这两个js引入必须紧挨着jsContainer这个div，放到其他位置不行--不知道为啥 QwQ -->
		<script type="text/javascript" src="js/locate/fixdiv.js"></script>
		<script type="text/javascript" src="js/locate/address.js"></script>
		
		<span><label for="TrainOutDate" class="seachfont">出发日期：</label></span>	
		<input type="text" id="TrainOutDate"  class="input-width2" name="strOutDate" value="${strOutDate }"/>
	<br>
						<input type="submit" class="btn btnheight "  value="搜索" />
							</h4>
							</form>
							</div>
							<!-- 往返 -->
							<div>
							<!-- 12.30 将form表单样式去丢  原有class="info-form" -->
						<form action="frontsearchtrainplan?strIsReturn=1"  method="post" >
						<h4 class="widget-title at-float-left">
						
							<span><label for="homecity_name2" class="seachfont">出发地：</label></span>	
		<input type="text" value="${strOutCityName2 }" size="15" id="homecity_name2"  class="input-width" name="homecity_name2" mod="address|notice" mod_address_source="hotel" mod_address_suggest="@Beijing|北京|53@Shanghai|上海|321@Shenzhen|深圳|91@Guangzhou|广州|80@Qingdao|青岛|292@Chengdu|成都|324@Hangzhou|杭州|383@Wuhan|武汉|192@Tianjin|天津|343@Dalian|大连|248@Xiamen|厦门|61@Chongqing|重庆|394@" mod_address_reference="cityid" mod_notice_tip="中文/拼音" style="font-size:16px;"/>
		<input id="cityid2" name="cityid" type="hidden" value="${strcityid2 }"/>
			<a onclick="exchanges()"><i class="fa fa-exchange " aria-hidden="true" style="color: #1eab3c"  ></i></a>
		<span><label for="getcity_name2" class="seachfont">目的地：</label></span>	
		
		<input type="text" value="${strInCityName2 }" size="15" id="getcity_name2"  class="input-width" name="getcity_name2" mod="address|notice" mod_address_source="hotel" mod_address_suggest="@Beijing|北京|53@Shanghai|上海|321@Shenzhen|深圳|91@Guangzhou|广州|80@Qingdao|青岛|292@Chengdu|成都|324@Hangzhou|杭州|383@Wuhan|武汉|192@Tianjin|天津|343@Dalian|大连|248@Xiamen|厦门|61@Chongqing|重庆|394@" mod_address_reference="getcityid" mod_notice_tip="中文/拼音" style="font-size:16px;"/>
		<input id="getcityid2" name="getcityid" type="hidden"  value="${strgetcityid2 }"/>
		
		<div id="jsContainer" class="jsContainer" style="height:0">
		    <div id="tuna_alert" style="display:none;position:absolute;z-index:999;overflow:hidden;"></div>
		    <div id="tuna_jmpinfo" style="visibility:hidden;position:absolute;z-index:120;"></div>
		</div>
		<!-- 这两个js引入必须紧挨着jsContainer这个div，放到其他位置不行--不知道为啥 QwQ -->
		<script type="text/javascript" src="js/locate/fixdiv.js"></script>
		<script type="text/javascript" src="js/locate/address.js"></script>
	
		<span><label for="TrainOutDate1" class="seachfont">出发日期：</label></span>	
		<input type="text" id="TrainOutDate1"  class="input-width2" name="strOutDate1" value="${strOutDate1 }"/>
			
			<span><label for="TrainBackDate1" class="seachfont">返程日期：</label></span>	
		<input type="text" id="TrainBackDate1"  class="input-width2" name="strBackDate1" value="${strBackDate1 }"/>
		<br>
		<input type="submit" class="btn btnheight "  value="搜索" />
						</h4>
							</form>
							</div>
							<!-- 多程 -->
					<%-- 		<div>
							<!-- 12.30 将form表单样式去丢  原有class="info-form" -->
						<form action="tofrontplaneindex?strIsReturn=2"  >
						<h4 class="widget-title at-float-left">
							 <span><label for="ScenicZoneID" class="seachfont">所属区域：</label></span>			
							<select class="input-select-vlign  select-height" id="ScenicZoneID" name="strProvinceID" emptyOption="false"
								onchange="changeSelect(this,'getLevel4','level3','ZoneID')">
									<option value="" <c:if test="${strProvinceID==''}"> selected="selected"</c:if>>--请选择--</option>
									<c:forEach var="lstConstZoneProvince" items="${lstConstZoneProvince}">
						<option value="${lstConstZoneProvince.getZoneID()}" <c:if test="${strProvinceID==lstConstZoneProvince.getZoneID()}"> selected="selected"</c:if>>${lstConstZoneProvince.getZoneName()}</option>
						</c:forEach>
							</select> 
							<select class='select-height input-select-vlign ZoneID' name='strCityID'
								emptyOption='false'>
									<option value="" <c:if test="${strCityID==''}"> selected="selected"</c:if>>--请选择--</option>
									<c:forEach var="lstConstZoneCity" items="${lstConstZoneCity}">
											<option value="${lstConstZoneCity.getZoneID()}" <c:if test="${strCityID==lstConstZoneCity.getZoneID()}"> selected="selected"</c:if>>${lstConstZoneCity.getZoneName()}</option>
										</c:forEach>
							</select>	
						<br>
							<span><label for="ScenicPrice1" class="seachfont"> 价格区间:</label></span>
							<input type="number" step="0.01"  id="strScenicPrice1" class="input-width" name="strScenicPrice1" maxlength="18" value="${strScenicPrice1}"/>
							<font class="fontsize">元</font>--
							<input type="number" step="0.01"  id="strScenicPrice2" class="input-width" name="strScenicPrice2" maxlength="18" value="${strScenicPrice2}" /><font class="fontsize">元</font>
							
						
							<input type="submit" class="btn btnheight "  value="搜索" />
							</h4>
							</form>
							</div> --%>
							</div>
							
						</div>		
					 </div >
					 </div>
				</header>
		<section class="container">
		<div class="portfolios portfolios-page">
		<c:choose>
		<c:when test="${strIsReturn==0 }">
		
			<h4 class="info-h4">单程</h4><h5 class="info-h5 "> ${strOutCityName } -->${strInCityName } ${strOutDate } 出发</h5>
				<div class="row" id="scenicrow">
				
				<c:forEach items="${lstTrainPlan}" var="lstTrainPlan" varStatus="status">
					<div class="span-12 col"  style=" margin-bottom: 20px;">
						<div class="planeportfolios-box paddingtop3" >
				
						 <div class="span-2 col " style="padding-top:20px;">
						<span > ${lstTrainPlan.getTrainName()}</span>
						 </div>
						 <div class="span-7 col"  >
						 <div style="margin-bottom: 20px;margin-top: 20px;">
						 <div class="at-float-left">
						 <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstTrainPlan.getStartDate()}</font>
						  <br>
						   <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstTrainPlan.getStationOutName()}</font>
						   </div>
						  <div class="at-float-right">
						  <div class="at-float-left" style="margin-right: 10px;">
						  <img alt="" src="img/时刻表箭头.png" >
						  </div>
						   <div class="at-float-left">
						   <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstTrainPlan.getEndDate()}</font>
						     <br>
						   <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstTrainPlan.getStationInName()}</font>
						   </div>
						 </div>
						  </div>
						  
						  </div>
						 <div class="span-2 col"  style="margin-top: 20px;">
						 <font style="font-size: 14px" class="at-float-left">￥</font>
										<font style="font-size: 34px;color:#ea5604">${lstTrainPlan.getPrice()}</font>
								
						  </div> 
						<div class="span-1 col"  style="margin-top: 20px;">
						
							<input type="button" class="btns" value="预留"  onclick="reserveTrain(${lstTrainPlan.getPlanID()},${tSysUser.getUserID()})"/>
					
						  </div> 
						</div>
						</div>
			
			</c:forEach>
				</div>
		</c:when>
		<c:when test="${strIsReturn==1 }">
			<h4 class="info-h4">去程</h4><h5 class="info-h5 "> ${strOutCityName2 } -->${strInCityName2 } ${strOutDate1 } 出发</h5>
						<div class="row" id="scenicrow">
				
				<c:forEach items="${lstTrainPlan}" var="lstTrainPlan" varStatus="status">
					<div class="span-12 col"  style=" margin-bottom: 20px;">
						<div class="planeportfolios-box paddingtop3" >
						
						
						 <div class="span-2 col " style="padding-top:20px;">
					
						<span > ${lstTrainPlan.getTrainName()}</span>
						 </div>
						 <div class="span-7 col"  >
						 <div style="margin-bottom: 20px;margin-top: 20px;">
						 <div class="at-float-left">
						 <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstTrainPlan.getStartDate()}</font>
						  <br>
						   <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstTrainPlan.getStationOutName()}</font>
						   </div>
						  <div class="at-float-right">
						  <div class="at-float-left" style="margin-right: 10px;">
						  <img alt="" src="img/时刻表箭头.png" >
						  </div>
						   <div class="at-float-left">
						   <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstTrainPlan.getEndDate()}</font>
						     <br>
						   <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstTrainPlan.getStationInName()}</font>
						   </div>
						 </div>
						  </div>
						  
						  </div>
						 <div class="span-2 col"  style="margin-top: 20px;">
						 <font style="font-size: 14px" class="at-float-left">￥</font>
										<font style="font-size: 34px;color:#ea5604">${lstTrainPlan.getPrice()}</font>
								
						  </div> 
						<div class="span-1 col"  style="margin-top: 20px;">
						<input type="radio" name="outSingle" value="${lstTrainPlan.getPlanID()}"/>
						  </div> 
						</div>
						</div>
			
			</c:forEach>
				</div>
				<h4 class="info-h4">返程</h4><h5 class="info-h5 "> ${strInCityName2 } -->${strOutCityName2 } ${strBackDate1 } 出发</h5>
						<div class="row" id="scenicrow">
				
				<c:forEach items="${lstBackTrainPlan}" var="lstBackTrainPlan" varStatus="status">
					<div class="span-12 col"  style=" margin-bottom: 20px;">
						<div class="planeportfolios-box paddingtop3" >
						
						
						 <div class="span-2 col " style="padding-top:20px;">
					
						<span > ${lstBackTrainPlan.getPlaneName()}</span>
						 </div>
						 <div class="span-7 col"  >
						 <div style="margin-bottom: 20px;margin-top: 20px;">
						 <div class="at-float-left">
						 <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstBackTrainPlan.getStartDate()}</font>
						  <br>
						   <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstBackTrainPlan.getStationOutName()}</font>
						   </div>
						  <div class="at-float-right">
						  <div class="at-float-left" style="margin-right: 10px;">
						  <img alt="" src="img/时刻表箭头.png" width="20%">
						  </div>
						   <div class="at-float-left">
						   <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstBackTrainPlan.getEndDate()}</font>
						     <br>
						   <font style="font-size: 24px; font-weight: 800; height: 40px;">${lstBackTrainPlan.getStationInName()}</font>
						   </div>
						 </div>
						  </div>
						  </div>
						 <div class="span-2 col"  style="margin-top: 20px;">
						 <font style="font-size: 14px" class="at-float-left">￥</font>
										<font style="font-size: 34px;color:#ea5604">${lstBackTrainPlan.getPrice()}</font>
								
						  </div> 
						<div class="span-1 col"  style="margin-top: 20px;">
						<input type="radio" name="inSingle" value="${lstBackTrainPlan.getPlanID()}"/>
						  </div> 
						</div>
						</div>
			
			</c:forEach>
				</div>	
		</c:when>
		<c:otherwise>
		
		</c:otherwise>
		</c:choose>
			
		</div>
		
		</section> 
		</article> 
		</main>
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main End -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		</div>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
	</div>
	<!-- /st-container -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!-- Script Embed Start -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!-- Main Slider -->
		
<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>

	
</body>

</html>